<?php
// Test of R0910CMS 
// created by zyn
// time : 20100124

class TablePeople extends R_Db_Row{
	function init(){
		$this->tableName   = "people";
        /**
         *@argu 1. check_type 2. length / type+length
         */
        $this->col["id"]   = &R_Db_CellFactory::get(R_Db_DataCheck::INTEGER);
        //$this->col["id"]   = &R_Db_CellFactory::get(R_Db_DataCheck::INTEGER,"int(10)");
        $this->col["id"]   ->setPrimary()
                           ->setNotNull()
                           //->setDefaultValue(0)
                           ->setUnsigned()
                           ->setAutoIncrement();
        //$this->col["id"]   = R_Db_CellFac::get(R_Db_CellFac::INTEGER,10,"");
        $this->col["name"] = &R_Db_CellFactory::get(R_Db_DataCheck::STRING,10);
		$this->col["name"] ->setComment('User Name');
        $this->col["age"]  = &R_Db_CellFactory::get(R_Db_DataCheck::INTEGER,10);

		//$this->col["id"]   = new R_Db_Cell("id"  ,R_Db_DataCheck::INTEGER);
		//$this->col["name"] = new R_Db_Cell("name",R_Db_DataCheck::STRING|R_Db_DataCheck::NOTNULL );
		//$this->col["age"]  = new R_Db_Cell("age" ,R_Db_DataCheck::INTEGER);
	}
}
